﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using Caliburn.Micro.BikeWizard.Services;

namespace Caliburn.Micro.BikeWizard.Views
{
    [Export()]
    public class ShellViewModel : Screen
    {
        #region Private Members
        private IWindowManager windowManager;
        private IBikeOptionService bikeOptionService;
        private ExportFactory<BikeWizardViewModel> bikeWizardViewModelFactory;
        #endregion

        #region Constructors
        [ImportingConstructor()]
        public ShellViewModel(
            IWindowManager windowManager,
            IBikeOptionService bikeOptionService,
            ExportFactory<BikeWizardViewModel> bikeWizardViewModelFactory)
        {
            this.windowManager = windowManager;
            this.bikeOptionService = bikeOptionService;
            this.bikeWizardViewModelFactory = bikeWizardViewModelFactory;
        }
        #endregion

        #region Events Handlers (Local)
        public void StartBikeWizard()
        {
            windowManager.ShowDialog(bikeWizardViewModelFactory.CreateExport().Value);
        }
        #endregion
    }
}
